<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .menus {
            width:200px;
            height:800px;
            border:1px solid red;
        }
        .menus .header{
            background-color:gold;
            padding:10px 5px;
            border-bottom:1px dotted #dddddd;
        }
        .menus .content a{
            display:block;
            padding:5px 5px;
            border-bottom:1px dotted #dddddd;
        }
        .hide {
            display:none;
        }
    </style>
</head>
<body>
    <div class="menus">
        <div class="item">
            <div class="header" onclick="clickMe(this);">上海</div>
            <div class="content hide">
                <a>宝山区</a>
                <a>青浦区</a>
                <a>浦东新区</a>
                <a>普陀区</a>
            </div>
        </div>
        <div class="item">
            <div class="header " onclick="clickMe(this);">北京</div>
            <div class="content hide">
                <a>朝阳区</a>
                <a>海淀区</a>
                <a>昌平区</a>
                <a>东城区</a>
            </div>
        </div>
    </div>
    <script src="/static/js/jquery-3.6.0.min.js"></script>
    <script>
        function clickMe(self) {
            $(self).next().removeClass("hide");
        }
    </script>
</body>
</html>